package com.javasm.duanju.enums;

public enum VideoStatus {

    DRAFT(0, "草稿"),
    UP(1, "上架"),
    DOWN(2, "下架");

    private Integer status;

    private String desc;

    VideoStatus(int staus, String desc) {
        this.status = staus;
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String desc(Integer status) {
        for (VideoStatus courseStatus : values()) {
            if (courseStatus.getStatus() == status) {
                return courseStatus.getDesc();
            }
        }
        return null;
    }

    public boolean equals(Integer status){
        return this.status.intValue() == status;
    }
}
